<template>
  <div id="app">
  <keep-alive>
    <router-view />
  </keep-alive>
  <!-- <keep-alive></keep-alive> -->
  </div>
</template>
<script>
export default {
  beforeCreate() {
    console.log('父组件的beforecreate')
  },
  created() {
    console.log('父组件的created')
  },
  beforeMount() {
    console.log('父组件的beforeMount')
  },
  mounted() {
    console.log('父组件的mounted')
  },
  beforeUpdate() {
    console.log('父组件的beforeUpdate')
  },
  updated() {
    console.log('父组件的update')
  },
  beforeDestroy() {
    console.log('父组件的beforeDestory')
  },
  destroyed() {
    console.log('父组件的destoryed')
  },
  methods: {
    handleClick() {
      this.message = '这是父组件的新信息'
    },
  },
}
</script>

<style scoped></style>
